package com.dnjn.happiness.survey.api;

import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import com.dnjn.happiness.survey.api.factory.RemoteSurveyFallbackFactory;
import com.dnjn.happiness.survey.api.model.StatisticalAnalysisModel;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.List;

@FeignClient(contextId = "remoteSurveyService", value = ServiceNameConstants.SURVEY_SERVICE, fallbackFactory = RemoteSurveyFallbackFactory.class)
public interface RemoteSurveyService {

    @PostMapping("/admin/survey/selectStatisticalAnalysisSurvryList")
    public R<List<StatisticalAnalysisModel>> selectStatisticalAnalysisSurvryList(@RequestBody StatisticalAnalysisModel vo, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);

}
